package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EquipmentMaintenanceDetailMapper;
import com.ruoyi.system.domain.EquipmentMaintenanceDetail;
import com.ruoyi.system.service.IEquipmentMaintenanceDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * maintenanceService业务层处理
 * 
 * @author admin
 * @date 2020-07-20
 */
@Service
public class EquipmentMaintenanceDetailServiceImpl implements IEquipmentMaintenanceDetailService 
{
    @Autowired
    private EquipmentMaintenanceDetailMapper equipmentMaintenanceDetailMapper;

    /**
     * 查询maintenance
     * 
     * @param id maintenanceID
     * @return maintenance
     */
    @Override
    public EquipmentMaintenanceDetail selectEquipmentMaintenanceDetailById(Long id)
    {
        return equipmentMaintenanceDetailMapper.selectEquipmentMaintenanceDetailById(id);
    }

    /**
     * 查询maintenance列表
     * 
     * @param equipmentMaintenanceDetail maintenance
     * @return maintenance
     */
    @Override
    public List<EquipmentMaintenanceDetail> selectEquipmentMaintenanceDetailList(EquipmentMaintenanceDetail equipmentMaintenanceDetail)
    {
        return equipmentMaintenanceDetailMapper.selectEquipmentMaintenanceDetailList(equipmentMaintenanceDetail);
    }

    @Override
    public List<EquipmentMaintenanceDetail> selectEquipmentMaintenanceDetailByMaintenanceId(Long id) {
        return equipmentMaintenanceDetailMapper.selectEquipmentMaintenanceDetailByMaintenanceId(id);
    }

    /**
     * 新增maintenance
     * 
     * @param equipmentMaintenanceDetail maintenance
     * @return 结果
     */
    @Override
    public int insertEquipmentMaintenanceDetail(EquipmentMaintenanceDetail equipmentMaintenanceDetail)
    {
        return equipmentMaintenanceDetailMapper.insertEquipmentMaintenanceDetail(equipmentMaintenanceDetail);
    }

    /**
     * 修改maintenance
     * 
     * @param equipmentMaintenanceDetail maintenance
     * @return 结果
     */
    @Override
    public int updateEquipmentMaintenanceDetail(EquipmentMaintenanceDetail equipmentMaintenanceDetail)
    {
        return equipmentMaintenanceDetailMapper.updateEquipmentMaintenanceDetail(equipmentMaintenanceDetail);
    }

    /**
     * 删除maintenance对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentMaintenanceDetailByIds(String ids)
    {
        return equipmentMaintenanceDetailMapper.deleteEquipmentMaintenanceDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除maintenance信息
     * 
     * @param id maintenanceID
     * @return 结果
     */
    @Override
    public int deleteEquipmentMaintenanceDetailById(Long id)
    {
        return equipmentMaintenanceDetailMapper.deleteEquipmentMaintenanceDetailById(id);
    }
}
